/**
 * 创建设备分类服务
 * @param {*} params
 * @returns
 */
const createDeviceCategory = function (params) {
  return fetch("/api/v1/device-category/create?" + new Date().getTime(), {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    body: JSON.stringify(params),
  });
};
/**
 * 获取设备分类列表服务
 * @param {*} params
 * @returns
 */
const getDeviceCategory = function (params) {
  return fetch("/api/v1/device-category/list?" + new Date().getTime(), {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    body: JSON.stringify(params),
  });
};
/**
 * 编辑设备分类服务
 * @param {*} params
 * @returns
 */
const updateDeviceCategory = function (params) {
  return fetch("/api/v1/device-category/update?" + new Date().getTime(), {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    body: JSON.stringify(params),
  });
};
/**
 * 删除设备分类服务
 * @param {*} params
 * @returns
 */
const deleteDeviceCategory = function (params) {
  return fetch("/api/v1/device-category/delete?" + new Date().getTime(), {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    body: JSON.stringify(params),
  });
};
export default {
  createDeviceCategory,
  getDeviceCategory,
  updateDeviceCategory,
  deleteDeviceCategory,
};
